package pers.cyril.jdb.server.config;

import lombok.Data;
import pers.cyril.jdb.common.annotation.ConfigName;

import java.nio.file.Paths;

/**
 * 说点什么吧
 *
 * @author Wang Cyril
 * @date 2024/5/24 20:30
 */
@Data
public class ServerConfig {

    public static final ServerConfig INSTANCE = new ServerConfig();

    @ConfigName(value = "data.dir", required = false)
    private String dataDir = Paths.get(System.getProperty("user.dir"), "data").toString();

    @ConfigName("server.host")
    private String serverHost;

    @ConfigName("server.port")
    private Integer serverPort;

    @ConfigName(value = "connection.allIdleTime", required = false)
    public Long connectionAllIdleTime = 120000L;

    @ConfigName(value = "connection.readIdleTime", required = false)
    public Long connectionReadIdleTime = 0L;

    @ConfigName(value = "connection.writeIdleTime", required = false)
    public Long connectionWriteIdleTime = 0L;
}
